def move(var a : String, var b : String, var n : Int) {
    print("move plate %d from %s to %s." % (n, a, b));
}

def hanoi(var a : String, var c : String, var b : String, var n : Int) {
    if (n == 1) {
        move(a, c, 1);
        return unit;
    }

    hanoi(a, b, c, n-1);
    move(a, c, n);
    hanoi(b, c, a, n-1);
    return unit;
}


hanoi("A", "C", "B", 3);
